package main

import (
	"fmt"
	"runtime"
	"time"
)

func running() {
	for {
		fmt.Println("running in another goroutine")

		time.Sleep(time.Second * 2)
	}
}

func main() {
	//新开了一个线程
	//go running()
	//var input string
	////这才是主线程做的事，等主线程输入后，那么主线程就结束，这个副线程也会结束
	//fmt.Scanln(&input)

	cpu := runtime.NumCPU()
	fmt.Println(cpu)
}
